import Vue from 'vue'
import Router from 'vue-router'

import home from '@/components/home/home.vue'
import carts from '@/components/carts/carts.vue'
import categora from '@/components/categora/categora.vue'
import searchResult from '@/components/home/searchResult.vue'
import goods_container from '@/components/home/goods_container.vue'
import askPeople from '@/components/home/askPeople.vue'
import askPeople_detail from '@/components/home/askPeople_detail.vue'

//我的
import my from '@/components/my/my.vue'
import changeSuccess from '@/components/my/changeSuccess.vue'
import addAddr from '@/components/my/addAddr.vue'
import myOrders from '@/components/my/myOrders.vue'
import mycomment from '@/components/my/mycomment.vue'
import giveComment from '@/components/my/giveComment.vue'
import setting from '@/components/my/setting.vue'
import helpCenter from '@/components/my/helpCenter.vue'
import helpdetail from '@/components/my/helpdetail.vue'
import aboutUs from '@/components/my/aboutUs.vue'
import finalPay from '@/components/carts/pay.vue'
import introduce from '@/components/my/introduce.vue'
import registerText from '@/components/my/registerText.vue'
import detailComplete from '@/components/my/detailComplete.vue'
import actionOrderList from '@/components/my/actionOrderList.vue'
import detailActionComplete from '@/components/my/detailActionComplete.vue'
import incomeRec from '@/components/my/incomeRec.vue'
import aftSerOrder from '@/components/my/aftSerOrder.vue'
import account from '@/components/carts/account.vue'
import myAddr from '@/components/carts/chosAddr.vue'
import changeAddr from '@/components/my/changeAddr.vue'
import searchhot from '@/components/home/searchhot.vue'
import productComment from '@/components/my/productComment.vue'
import shouhouDetail from '@/components/my/shouhouDetail.vue'
import aftSerDetail from '@/components/my/aftSerDetail.vue'
import logisticsDetail from '@/components/my/logisticsDetail.vue'
import goodOrderList from '@/components/my/goodOrderList.vue'
import detailGoodComplete from '@/components/my/detailGoodComplete.vue'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: '/wechat/',
  routes: [
    {
      path: '/',
      name: 'home',
      meta: {
        title: '首页'
      },
      component: home
    },
    {
      path: '/categora',
      name: 'categora',
      meta: {
        title: '商品分类'
      },
      component: categora
    },
    {
      path: '/searchResult',
      name: 'searchResult',
      component: searchResult
    },
    {
      path: "/goods_container",
      name: "goods-container",
      meta: {
        title: "商品详情页"
      },
      component: goods_container
    },
    {
        path:'/my',
        name:"my",
        meta:{
            title:"我的"
        },
        component:my,
    },

	  {
		  path:'/mycomment',
		  name:"mycomment",
		  meta:{
			  title:"联系客服"
		  },
		  component:mycomment,
	  },
	  {
		  path:'/giveComment',
		  name:"giveComment",
		  meta:{
			  title:"发表评价"
		  },
		  component:giveComment,
	  },

	  {
		  path:"/finalPay",
		  name:"finalPay",
		  meta:{
			  title:"支付完成"
		  },
		  component:finalPay
		},
		{
			path: '/askpeople',
			name: 'askpeople',
			meta: {
				title: '问大家'
			},
			component: askPeople
		},
		{
			path: '/askpeople_detail',
			name: 'ask-detail',
			meta: {
				title: '问大家详情'
			},
			component: askPeople_detail
	  },
	  {
		  path: '/changeSuccess',
		  name: 'changeSuccess',
		  meta: {
			  title: '更换成功'
		  },
		  component: changeSuccess
	  },
	  {
		  path: '/addAddr',
		  name: 'addAddr',
		  meta: {
			  title: '新增收货地址'
		  },
		  component: addAddr
	  },
	  {
		  path: '/myOrders',
		  name: 'myOrders',
		  meta: {
			  title: '我的订单'
		  },
		  component: myOrders
	  },
	  {
		path: "/detailComplete",
		name: "detailComplete",
		meta: {
			title: "订单详情"
		},
		component: detailComplete
	  },
	  {
		  path: '/setting',
		  name: 'setting',
		  meta: {
			  title: '设置'
		  },
		  component: setting
	  },
	  {
		  path: '/helpCenter',
		  name: 'helpCenter',
		  meta: {
			  title: '帮助中心'
		  },
		  component: helpCenter
	  },
	  {
		  path: '/helpdetail',
		  name: 'helpdetail',
		  meta: {
			  title: '怎么充值？'
		  },
		  component: helpdetail
	  },
	  {
		  path: '/aboutUs',
		  name: 'aboutUs',
		  meta: {
			  title: '关于我们'
		  },
		  component: aboutUs
	  },{
		path: '/introduce',
		name: 'introduce',
		meta: {
			title: '功能介绍'
		},
		component: introduce
	},{
		path: '/registerText',
		name: 'registerText',
		meta: {
			title: '注册协议'
		},
		component: registerText
	},
	  {
		  path: '/incomeRec',
		  name: 'incomeRec',
		  meta: {
			  title: '我的钱包'
		  },
		  component: incomeRec
	  },
	  {
		  path: '/aftSerOrder',
		  name: 'aftSerOrder',
		  meta: {
			  title: '退货/售后'
		  },
		  component: aftSerOrder
	  },
	  {
      path: '/account',
      name: 'account',
      meta: {
        title: '结算'
      },
      component: account
    },
    {
      path: '/myAddr',
      name: 'myAddr',
      meta: {
        title: '我的收货地址'
      },
      component: myAddr
    },
    { 
      path: '/changeAddr',
      name: 'changeAddr',
      meta: {
        title: '编辑收货地址'
      },
      component: changeAddr
    },
    {
      path: '/carts',
      name: 'carts',
      meta: {
        title: '购物车'
      },
      component: carts
    },
    {
      path: '/searchhot',
      name: 'searchhot',
      meta: {
        title: '商品搜索'
      },
      component: searchhot
    },{
		path: '/productComment',
		name: 'productComment',
		meta: {
			title: '订单评论'
		},
		component: productComment
	  },{
		path: '/actionOrderList',
		name: 'actionOrderList',
		meta: {
			title: '激活订单'
		},
		component: actionOrderList
	  },{
		path: '/detailActionComplete',
		name: 'detailActionComplete',
		meta: {
			title: '订单详情'
		},
		component: detailActionComplete
	  },{
		path: '/shouhouDetail',
		name: 'shouhouDetail',
		meta: {
			title: '售后/退款'
		},
		component: shouhouDetail
	  },{
		path: '/aftSerDetail',
		name: 'aftSerDetail',
		meta: {
			title: '售后/退款'
		},
		component: aftSerDetail
	  },{
		path: '/logisticsDetail',
		name: 'logisticsDetail',
		meta: {
			title: '物流详情'
		},
		component: logisticsDetail
	  },{
		path: '/goodOrderList',
		name: 'goodOrderList',
		meta: {
			title: '购买订单'
		},
		component: goodOrderList
	  },{
		path: '/detailGoodComplete',
		name: 'detailGoodComplete',
		meta: {
			title: '订单详情'
		},
		component: detailGoodComplete
	  }
]
})